<!DOCTYPE html>
<html>
<head>
    <title><?php echo $title; ?> // Admin</title>
	<link rel="stylesheet" href="<?php echo site_url('public/css/style.css'); ?>" />
	<link rel="stylesheet" href="<?php echo site_url('public/css/chosen.css'); ?>" />
    <script src="<?php echo site_url('public/js/jquery.js'); ?>"></script>
    <script src="<?php echo site_url('public/js/alert.js'); ?>"></script>
    <script src="<?php echo site_url('public/js/modal.js'); ?>"></script>
	<script src="<?php echo site_url('public/js/dropdown.js'); ?>"></script>
	<script src="<?php echo site_url('public/js/chosen.js'); ?>"></script>
    
    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <style>
        section { padding-top: 20px; }
		#masthead {
			background-color: #049cd9;
			background-repeat: no-repeat;
			background-image: -webkit-gradient(linear, left top, left bottom, from(#004D9F), to(#049cd9));
			background-image: -webkit-linear-gradient(#004D9F, #049cd9);
			background-image: -moz-linear-gradient(#004D9F, #049cd9);
			background-image: -o-linear-gradient(top, #004D9F, #049cd9);
			background-image: -khtml-gradient(linear, left top, left bottom, from(#004D9F), to(#049cd9));
			filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#004D9F', endColorstr='#049cd9', GradientType=0); /* IE8 and down */
			min-width: 1020px;
		}
		#main-content { min-height: 500px; }
    </style>
	
</head>
<body>
    <!-- header -->
	<header id="masthead">
		<div class="grid">
			<div class="container-fluid">
				<h1 class="pull-left">San Miguel Purefoods</h1>
				<p class="pull-right">Welcome, <?php echo $this->user['firstname']; ?>. <?php echo anchor('logout', 'Logout?'); ?></p>
			</div>
		</div>
	</header>
    <div class="topbar">
        <div class="topbar-inner">
            <div class="container-fluid">
                <ul class="nav pull-left">
                    <li <?php echo $active == 'dash' ? 'class="active"' : ''; ?>><?php echo anchor('dashboard', 'Dashboard'); ?></li>
					<li><?php echo anchor('#', 'Contents'); ?></li>
					<li><?php echo anchor('#', 'Products'); ?></li>
					<li><?php echo anchor('#', 'Recipes'); ?></li>
					<li class="dropdown <?php echo $active == 'orders' ? 'active' : ''; ?>" data-dropdown="dropdown">
						<a href="javascript:void(0)" class="dropdown-toggle">Orders</a>
						<ul class="dropdown-menu">
							<li><?php echo anchor('orders', 'View Orders'); ?></li>
							<li><?php echo anchor('orders', 'View Customers'); ?></li>
						</ul>
					</li>
					<li><?php echo anchor('#', 'Careers'); ?></li>
                    <li><?php echo anchor('#', 'Reports'); ?></li>
					<li class="dropdown <?php echo $active == 'users' ? 'active' : ''; ?>" data-dropdown="dropdown">
						<a href="javascript:void(0)" class="dropdown-toggle">Users</a>
						<ul class="dropdown-menu">
							<li><?php echo anchor('users', 'View Users'); ?></li>
							<li><?php echo anchor('users/permissions', 'View Permissions'); ?></li>
							<li><?php echo anchor('users/roles', 'View Role Permissions'); ?></li>
							<li class="divider"></li>
							<li><?php echo anchor('users/create', 'Create User'); ?></li>
							<li><?php echo anchor('users/create', 'Create Permission'); ?></li>
						</ul>
					</li>
                </ul>
            </div>
        </div>
    </div>
    <!-- main content -->
    <div id="main-content" class="container-fluid">
        <?php $this->view($content); ?>
    </div>
	<!-- footer -->
	<footer class="footer">
		<div class="container-fluid">
			<p class="pull-left">San Miguel Purefoods &copy; 2011 <br/> Snapworx Digital (Gene, JA, Mark, Mac)</p>
			<p class="pull-right">{elapsed_time}</p>
		</div>
	</footer>
	<script>
		$('.topbar').dropdown();
		$('select[data-placeholder]').chosen();
	</script>
</body>
</html>